package com.fuze.questionnaire.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author sepc_
 * @date 10/15/2021 11:59
 * 问题表实体
 */
@ApiModel(value = "problem_tab")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "problem_tab")
public class Problem implements Serializable {
    private static final long serialVersionUID = 7010774864469947869L;
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "primary key")
    private Integer id;

    /**
     * 问题字段
     */
    @TableField(value = "problem")
    @ApiModelProperty(value = "问题字段")
    private String problem;

    /**
     * 属于第几项的type（一、二。。）
     */
    @TableField(value = "project_type_id")
    @ApiModelProperty(value = "属于第几项的问题type")
    private Integer projectTypeId;

    /**
     * 上级问题id
     */
    @TableField(value = "superior_problem_id")
    @ApiModelProperty(value = "上级问题id")
    private Integer superiorProblemId;

    /**
     * 问题类型（1为单选；2为多选；3为填空）
     */
    @TableField(value = "question_type")
    @ApiModelProperty(value = "问题类型（1为单选；2为多选；3为填空）")
    private Integer questionType;

    @TableField(value = "sorted")
    @ApiModelProperty(value = "问题排序权重")
    private Long  sorted;


    public static final String COL_ID = "id";

    public static final String COL_PROBLEM = "problem";

    public static final String COL_PROJECT_TYPE_ID = "project_type_id";

    public static final String COL_SUPERIOR_PROBLEM_ID = "superior_problem_id";

    public static final String COL_QUESTION_TYPE = "question_type";

    public static final String COL_SORTED = "sorted";
}